Increasing pipe buffer size for non win32 machines#144
Merged
Conversation
a200bf0 to
1ad8ff3
Compare
pedjaradenkovic
approved these changes
Mar 31, 2026
|
|
||
| if sys.platform != "win32": | ||
| # Set the pipe size to 1MB to avoid buffer overflows | ||
| fcntl.fcntl(proc.stdout.fileno(), F_SETPIPE_SZ, 1024 * 1024) # 1MB |
Contributor
There was a problem hiding this comment.
Extract 1024 to a constant please.
Contributor
There was a problem hiding this comment.
Also name it F_SETPIPE_SIZE 👍
| start_new_session=(sys.platform != "win32"), | ||
| ) | ||
|
|
||
| if sys.platform != "win32": |
1ad8ff3 to
09808f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found an issue with running the unit testing script on Debian OS. The observation was that the script hanged within the renderer, but when I run it manually it passed within a few seconds. The investigation showed that on Debian the size of the pipe buffer is a default of 64KB and our current approach of running the test scripts resulted in a deadlock when an overflow happens leading to a 120 second timeout. On MacOs machines the size of the pipe buffer is 1MB and this PR sets this for non Win32 machines as well.